home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-16 | 727 b | 41 lines | [TEXT/CWIE] |
- // PipePacket.h
-
- #ifndef PipePacket_h
- #define PipePacket_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
-
- class PipePacket
- {
- private:
- uint32 data;
- bool flushing;
-
- public:
- enum Flush { flush };
-
- PipePacket() : data( 0 ), flushing( false ) {}
- PipePacket( Flush ) : data( 0 ), flushing( true ) {}
-
- explicit PipePacket( uint32 theData )
- : data( theData ), flushing( false )
- {}
-
- uint32 DataSize() const { return data; }
- bool Flushing() const { return flushing; }
-
- bool IsZero() const;
-
- void operator+=( PipePacket );
- void operator-=( PipePacket );
-
- void LimitTo( PipePacket );
-
- void LimitData( uint32 limit );
- void ClearFlush() { flushing = false; }
- };
-
- #endif
-